package custom.reflection;

import org.apache.ibatis.reflection.Reflector;
import org.apache.ibatis.reflection.property.PropertyNamer;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.*;

public class ReflectionTest2 {
	public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException {
		Class<?> clazz = Class.forName("custom.po.Student");
		Method sayHello = clazz.getMethod("sayHello", String.class,Integer.class);
		Field[] declaredFields = clazz.getDeclaredFields();
		for(Field field:declaredFields){
			System.out.println(field.getName()+"----"+field.getModifiers());
		}

		String getName = PropertyNamer.methodToProperty("getName");

		String one = "OnE";
		String s = one.toUpperCase(Locale.ENGLISH);
		System.out.println(s);
		//System.out.println(getName);
		/*Map<String,Integer> map = new HashMap<String, Integer>();
		map.put("A",1);
		map.put("B",2);
		List<String > list = new ArrayList<String>();
		list.add("One");
		list.add("Two");
		Iterator<String> iterator = list.iterator();
		String next = iterator.next();
		System.out.println(next);*/

		//Map<String, List<Method>> stringListMap = reflector.addGetMethods(clazz);


	}
}
